The present invention generally relates to log-shipping data replication between a primary system and a standby system, and more particularly, to independent log writing and log shipping at the primary system.
System architects and engineers often use multiple computer systems in a production environment in order to ensure the stability of business solutions. In such an environment, even if one computer system fails, the solution may fail over to the other computer systems. As an example, for a solution using a database, the environment may contain both a primary database system and a standby database system. In such an environment, the primary database may be replicated from a primary database management system (hereinafter “DBMS”) to a standby DBMS, such that if the primary database system fails, the standby database system contains an up-to-date copy of the database and can assume the workload of the primary database.
One technique for data replication is log-shipping data replication, in which transaction logs are transferred from the primary DBMS to the standby DBMS. The transaction logs may consist of database operations performed on the database by the primary DBMS. The standby DBMS may then process the transaction log, such that the instance of the database on the standby system is updated to reflect the instance of the database on the primary system. One known method for log-shipping data replication is to maintain a log buffer on the primary system, to periodically commit data in the log buffer to storage, and once the data is successfully stored, to transmit the stored data to the standby DBMS. Another known method is to concurrently write the data in the log buffer to storage and transmit the data in the log buffer to the standby DBMS. Although such solutions are advantageous in that they ensure that the standby DBMS only receives log data that the primary DBMS has stored or has definitely intended to commit to storage, such solutions also negatively impact the performance of the primary DBMS by creating bursts of high activity on the primary DBMS and on the network connecting the primary system and standby system.